1. Field of the Invention
The present invention relates to a recording and reproducing apparatus which includes a nonvolatile memory acting as a recording medium for recording digital data and a microcomputer for executing recording and reproduction of data on the nonvolatile memory.
2. Description of the Prior Art
FIG. 7 shows a conventional recording and reproducing apparatus and FIG. 8 shows a data structure of a nonvolatile memory of the conventional recording and reproducing apparatus of FIG. 7. In FIG. 7, the conventional recording and reproducing apparatus includes a power source 21 formed by a battery or the like, a booster 22, a decoupling capacitor 34, a flash memory 27 acting as the nonvolatile memory, a microcomputer 25, a display 33, a sound signal processor 28, a microphone 31 and a speaker 32. The sound signal processor 28 is constituted by a compression and expansion controller 29 and an A/D and D/A converting means 30. The power source 21 supplies a fixed voltage VDD to the whole conventional recording and reproducing apparatus through the booster 22. The decoupling capacitor 34 is provided at an output of the booster 22 so as to absorb variations of the fixed voltage VDD due to load variations.
Although not specifically shown, the conventional recording and reproducing apparatus includes various operating switches such as a recording key, a playback key, an erasure key and a stop key. For example, when the recording key has been operated, sound picked up by the microphone 31 is converted into digital data by the A/D and D/A converting means 30 and then, the digital data is compressed by compression function of the compression and expansion controller 29 so as to be recorded on the flash memory 27 via the microcomputer 25. On the other hand, when the playback key has been operated, compressed digital data recorded on the flash memory 27 is read out of the flash memory 27 and then, is delivered to the compression and expansion controller 29 by way of the microcomputer 25 so as to be expanded by expansion function of the compression and expansion controller 29. Subsequently, the expanded digital data is subjected to D/A conversion by the A/D and D/A converting means 30 so as to be converted into analog data such that the analog data is reproduced by the speaker 32.
Generally, in order to perform file management efficiently, a file management table (referred to as a "FMT", hereinafter) area (file management area) for collectively managing start addresses of files, etc. is provided in the flash memory 27 as shown in FIG. 8 so as to manage file information recorded in a data area of the flash memory 27.
In the conventional recording and reproducing apparatus in which the nonvolatile memory such as the flash memory 27 is employed as the recording medium and file management is performed by ordinary management of the FMT, the following disadvantages are incurred. Namely, if the battery is instantaneously detached from the conventional recording and reproducing apparatus due to vibrations during recording, data which is being recorded is invalidated. Meanwhile, if the battery is instantaneously detached from the conventional recording and reproducing apparatus during rewriting of the FMT area, the whole remaining file information may also be invalidated. Furthermore, if recording and reproduction are repeated in the conventional recording and reproducing apparatus, damage at the time of erasure and recording is concentrated at the FMT area and thus, service life of the nonvolatile memory is shortened extremely.